{extend name="public:common_index"/}
{block name="main"}
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-list"></i> {$title}</h3>
    </div>
    <div class="panel-body">

        <div class="navbar navbar-default">
            <form action="" id="search-form2" class="navbar-form form-inline" method="get" onsubmit="return false">

                <div class="form-group">
                    <label class="control-label" for="input-order-id">用户昵称(手机号码)</label>
                    <div class="input-group">
                        <input type="text" name="nick_name" value="{$Think.get.nick_name}" placeholder="用户昵称(手机号码)"
                               class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label" for="input-order-id">UUID</label>
                    <div class="input-group">
                        <input type="text" name="uuid" value="{$Think.get.uuid}" placeholder="UUID" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label" for="input-order-id">类型</label>
                    <div class="input-group">
                        <select class="form-control" name="type">
                            <option id="type" value="">全部</option>
                            <option id="type1" value="1">礼物</option>
                            <option id="type2" value="2">道具卡</option>
                        </select>
                    </div>
                </div>
                <button type="submit" onclick="javascript:document.getElementById('search-form2').submit();"
                        id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选
                </button>
                <a href="{:url('index')}" class="btn btn-primary pull-right"><i class="fa "></i>返回</a>
                <br />
                <!--<label class="control-label">支出统计:{$dec}&nbsp&nbsp&nbsp收入统计:{$inc}-->
                <!--</label>-->

                <!--<a href="{:url('examiner_batch')}" class="btn btn-primary pull-right"><i class="fa fa-folder-open-o"></i>批量导入</a>-->
            </form>
        </div>
        <div id="ajax_return">
            <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                <div class="table-responsive">
                    <table class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <td>序号</td>
                            <td>用户昵称</td>
                            <td>UUID</td>
                            <td>类型</td>
                            <td>缩略图</td>
                            <td>名称</td>
                            <td>价值</td>
                            <td>数量</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <!-- 列表循环开始 -->
                        {volist name="rows" id="row" key="key"}
                        <tr>
                            <td>{$row.p_id}</td>
                            <td>{$row.nick_name}</td>
                            <td>{$row.uuid}</td>

                            <td>{if $row.type eq 1}礼物{else}道具卡{/if}</td>
                            <td><img src="{$row.img}" style="max-width: 100px" alt=""> </td>
                            <td>{$row.name}</td>
                            <td>{$row.price}</td>
                            <td>{$row.num} </td>
                            <td>
                                <a class="btn btn-primary " href="/user/package_edit/id/{$row.p_id}">编辑</a>
                                <span class="btn btn-danger check_del" data-message="" data-url="{:url('user/package_del',['id'=>$row.p_id])}">删除</span>
                            </td>
                        </tr>
                        {/volist}
                        <!-- 列表循环结束 -->
                        </tbody>
                    </table>
                </div>
            </form>
        </div>
        <div id='pagerarea'>{$pageHTML}</div>
    </div>
</div>
{/block}
{block name="js"}
<script>
    $(function () {
        var is_agent = "{$Think.get.is_agent}";
        $('#is_agent'+is_agent).attr('selected','selected')
        var type = "{$Think.get.type}";
        $('#type'+type).attr('selected','selected')
    })
</script>
{/block}




